﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Collections.ObjectModel;

namespace BusinessObjects
{
    [DataContract] 
    public class TeamEvent : BaseBusinessObject
    {
        private Event quest;
        private int membersCount;
        private ObservableCollection<Player> members;


        public Event Quest
        {
            get
            {
                return this.quest;
            }
            set
            {
                if ( this.quest == value )
                    return;

                this.quest = value;
                this.NotifyPropertyChanged( "Quest" );
            }
        }

        public int MembersCount
        {
            get
            {
                return membersCount;
            }
            set
            {
                if ( this.membersCount == value )
                    return;

                this.membersCount = value;
                this.NotifyPropertyChanged( "MembersCount" );
            }
        }

        public ObservableCollection<Player> Members
        {
            get
            {
                if ( this.members == null )
                    this.members = new ObservableCollection<Player>();

                return this.members;
            }
            set
            {
                if ( this.members == value )
                    return;

                this.members = value;
                this.NotifyPropertyChanged( "Members" );
            }
        }

        public RegionObjectHolder RegionObject
        {
            get;
            set;
        }
    }
}
